-- disable_defense.lua
-- Created by zouyb Jun/05/2015
-- 禁止怪物对格子的守护

return {
    run = function(para)    
		local gridId = tonumber(para);
		local grid = DungeonM.getGridByPos(gridId);
		if not grid then
			return;
		end

        -- 禁止怪物对格子的守护
        grid.monster.dbase:set("can_not_lock", 1);
        
        -- 仍然禁止玩家攻击		
		grid.monster.dbase:set("guide_not_attack_monster", 1);
		EventMgr.fire(event.GRID_LOCK_STATE, {["pos"] = gridId, });
    end,
};